package com.mg.smarttask.client;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

@RemoteServiceRelativePath("UserService")
public interface UserService extends RemoteService {

	boolean registerUser(User user);
	boolean logUserIn(String eMail, String passWord, Boolean remember);
	boolean logUserOut();
	boolean updateUser(User user);
	boolean usernameUsed(String username);
	
	public static class Util {
		private static UserServiceAsync instance;
		public static UserServiceAsync getInstance(){
			if (instance == null) {
				instance = GWT.create(UserService.class);
			}
			return instance;
		}
	}
}
